<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>固定的吸顶灯效果</title>
		<style>
			#search{
				height: 80px;
				border: 1px solid red;
				width: 50%;
				/* position: fixed; */
				position: sticky;
				left: 300px;
				top: 0px;
			}
			#content{
				background-color: aquamarine;
				height: 10000px;
				width: 6000px;
			}
		</style>
	</head>
	<body>
		<div id="search">
			<form>
				<input type="text" size="26" />
				<input type="submit" value="搜索"/>
			</form>
		</div>
		<div id="content"></div>
	</body>
</html>